package com.itheima.demo;

public class Test {
    public static void main(String[] args) {
        //目标:   展示系统中的全部电影信息,如名称,价格
        //        允许用户根据电影id查询出对应电影的详细信息

        //1.设计电影类Movie,以便创建电影对象,封装电影数据
        //2.封装系统中的全部电影数据(没学数据库,自己造一些数据)
        Movie[] movies=new Movie[6];    //里面现在是null
        movies[0]=new Movie(1,"星际",19.6,"安");
        movies[1]=new Movie(2,"激情",19.8,"李");
        movies[2]=new Movie(3,"战狼",19.6,"王");
        movies[3]=new Movie(4,"流浪",29.6,"许");
        movies[4]=new Movie(5,"火星",29.9,"战");

        //3.创建电影操作对象出来，专门负责电影数据的业务操作
        MovieOperator mo=new MovieOperator(movies);     //把movies送过去
        mo.printAllMovies();        //可以alt+回车+回车直接在MovieOperator创建这个函数
        mo.searchMoviesById();
    }
}
